<?php


namespace Xiaoguai\DesignPattern\DP003\Decorator;


use Xiaoguai\DesignPattern\DP003\Decorator;

class LogDecorator extends Decorator
{
    public function get(string $key)
    {
        $res = parent::get($key);
        $info = [
            'key' => $key,
            'result' => $res,
        ];
        syslog(LOG_INFO, serialize($info));
        return $res;
    }
}